<?php
//decode by http://奥森世纪/
namespace app\home\controller;

use think\Controller;

class Share extends Controller {
     function _initialize() {
        header('Access-Control-Allow-Origin: *');
        header('Access-Control-Allow-Methods:POST,GET,OPTIONS');
        header('Access-Control-Allow-Headers:x-requested-with,content-type');
    }


    public function get_task_info() {
        $task_id=request()->param('task_id');

        if($task_id){
            $task_info=db('task')->field('id,category_id,title,unit_price,give_credit1,give_credit2,ticket_num,join_num')->where('id',$task_id)->find();


            to_json(0, '', $task_info);
        }

    }

}